#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;

int main() {
	vector<int> vec = { 2,1,3,2,4,1,5,4 };
	sort(vec.begin(), vec.end());
	auto last = unique(vec.begin(), vec.end());
	vec.erase(last, vec.end());
	for (const auto& num : vec) cout << num << " ";
	return 0;
}